<?php

namespace common\models\goods;

use Yii;

/**
 * This is the model class for table "goods_product".
 *
 * @property integer $goods_id
 * @property integer $shop_id
 * @property string $goods_name
 * @property string $sale_point
 * @property string $shop_spu
 * @property string $goods_spu
 * @property integer $goods_type
 * @property integer $category_id
 * @property integer $brand_id
 * @property integer $inventory_model
 * @property integer $sale_model
 * @property integer $sale_conditions
 * @property integer $sale_unit
 * @property integer $unit
 * @property integer $mixed
 * @property integer $price_settype
 * @property integer $sale_con_one
 * @property integer $sale_con_three
 * @property integer $sale_con_two
 * @property string $min_price
 * @property string $max_price
 * @property integer $is_delete
 * @property integer $on_sale
 * @property integer $reviewe_state
 * @property integer $free_post
 * @property integer $source
 * @property string $supplier
 * @property string $volume
 * @property string $weight
 * @property string $goods_descript
 * @property string $goods_img1
 * @property string $goods_img2
 * @property string $goods_img3
 * @property string $goods_img4
 * @property string $shop_category
 * @property integer $is_real_goods
 * @property integer $is_started
 * @property string $sale_count
 * @property integer $view_count
 * @property integer $distribute_price_result
 * @property integer $inventory_val
 * @property integer $warning_inventory_val
 * @property integer $ctime
 * @property integer $utime
 * @property integer $sku_price_satisfy_stauts
 * @property string $distribute_min_price
 * @property string $distribute_max_price
 * @property string $wholesale_retail_min_price
 * @property string $wholesale_retail_max_price
 * @property integer $is_complete
 * @property integer $shop_category_id
 */
class Product extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'goods_product';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['shop_id', 'goods_type', 'category_id', 'brand_id', 'inventory_model', 'sale_model', 'sale_conditions', 'sale_unit', 'unit', 'mixed', 'price_settype', 'sale_con_one', 'sale_con_three', 'sale_con_two', 'is_delete', 'on_sale', 'reviewe_state', 'free_post', 'source', 'is_real_goods', 'is_started', 'view_count', 'distribute_price_result', 'inventory_val', 'warning_inventory_val', 'ctime', 'utime', 'sku_price_satisfy_stauts', 'is_complete', 'shop_category_id'], 'integer'],
            [['min_price', 'max_price', 'volume', 'weight', 'sale_count', 'distribute_min_price', 'distribute_max_price', 'wholesale_retail_min_price', 'wholesale_retail_max_price'], 'number'],
            [['goods_descript'], 'string'],
            [['goods_name', 'sale_point', 'supplier', 'goods_img1', 'goods_img2', 'goods_img3', 'goods_img4', 'shop_category'], 'string', 'max' => 200],
            [['shop_spu', 'goods_spu'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'goods_id' => 'Goods ID',
            'shop_id' => 'Shop ID',
            'goods_name' => 'Goods Name',
            'sale_point' => 'Sale Point',
            'shop_spu' => 'Shop Spu',
            'goods_spu' => 'Goods Spu',
            'goods_type' => 'Goods Type',
            'category_id' => 'Category ID',
            'brand_id' => 'Brand ID',
            'inventory_model' => 'Inventory Model',
            'sale_model' => 'Sale Model',
            'sale_conditions' => 'Sale Conditions',
            'sale_unit' => 'Sale Unit',
            'unit' => 'Unit',
            'mixed' => 'Mixed',
            'price_settype' => 'Price Settype',
            'sale_con_one' => 'Sale Con One',
            'sale_con_three' => 'Sale Con Three',
            'sale_con_two' => 'Sale Con Two',
            'min_price' => 'Min Price',
            'max_price' => 'Max Price',
            'is_delete' => 'Is Delete',
            'on_sale' => 'On Sale',
            'reviewe_state' => 'Reviewe State',
            'free_post' => 'Free Post',
            'source' => 'Source',
            'supplier' => 'Supplier',
            'volume' => 'Volume',
            'weight' => 'Weight',
            'goods_descript' => 'Goods Descript',
            'goods_img1' => 'Goods Img1',
            'goods_img2' => 'Goods Img2',
            'goods_img3' => 'Goods Img3',
            'goods_img4' => 'Goods Img4',
            'shop_category' => 'Shop Category',
            'is_real_goods' => 'Is Real Goods',
            'is_started' => 'Is Started',
            'sale_count' => 'Sale Count',
            'view_count' => 'View Count',
            'distribute_price_result' => 'Distribute Price Result',
            'inventory_val' => 'Inventory Val',
            'warning_inventory_val' => 'Warning Inventory Val',
            'ctime' => 'Ctime',
            'utime' => 'Utime',
            'sku_price_satisfy_stauts' => 'Sku Price Satisfy Stauts',
            'distribute_min_price' => 'Distribute Min Price',
            'distribute_max_price' => 'Distribute Max Price',
            'wholesale_retail_min_price' => 'Wholesale Retail Min Price',
            'wholesale_retail_max_price' => 'Wholesale Retail Max Price',
            'is_complete' => 'Is Complete',
            'shop_category_id' => 'Shop Category ID',
        ];
    }
}
